package com.zeng.mvpdemo.presenter;

import android.content.Context;

import com.zeng.mvpdemo.App;
import com.zeng.mvpdemo.view.ILoginView;

public class LoginPresenter extends BasePresenter<ILoginView> {

    public void login(Context pContext, String name, String pwd) {

        getView().onProgressBarVisibility(true, "正在登录...");
        App.testHandler.postDelayed(new Runnable() {
            @Override
            public void run() {


                ILoginView view = getView();
                if (view != null) {
                    view.onProgressBarVisibility(false, "");
                    view.onLoginResult(true, "");
                    //
//                    view.onLoginResult(false,"密码不对");
                }

            }
        }, 2000);

    }
}
